package my.com.entity;

import java.io.Serializable;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

import org.apache.camel.dataformat.bindy.annotation.CsvRecord;
import org.apache.camel.dataformat.bindy.annotation.DataField;

@Entity
@Table(name = "broker")
@CsvRecord(separator = ",", skipFirstLine = true)
public class Broker implements Serializable {

	private static final long serialVersionUID = 5894319868045588295L;

	@Id
	@GeneratedValue
	@Column(name = "id")
	private String id;

	@Column(name = "nama")
	@DataField(pos = 2)
	private String nama;

	@Column(name = "alamat")
	@DataField(pos = 3)
	private String alamat;

	@Column(name = "saldo_uang")
	@DataField(pos = 4)
	private String saldoUang;
	
	@Column(name = "saldo_saham")
	@DataField(pos = 5)
	private String saldoSaham;
	
	public Broker() {
	}

	public Broker(String id, String nama, String alamat, String saldoUang,
			String saldoSaham) {
		super();
		this.id = id;
		this.nama = nama;
		this.alamat = alamat;
		this.saldoUang = saldoUang;
		this.saldoSaham = saldoSaham;
	}

	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public String getNama() {
		return nama;
	}

	public void setNama(String nama) {
		this.nama = nama;
	}

	public String getAlamat() {
		return alamat;
	}

	public void setAlamat(String alamat) {
		this.alamat = alamat;
	}



	@Override
	public String toString() {
		return "Broker [id=" + id + ", nama=" + nama + ", alamat=" + alamat
				+ ", saldoUang=" + saldoUang + ", saldoSaham=" + saldoSaham
				+ "]";
	}





}
